import request from '@/config/axios'

// 最新发表的微博列表 VO
export interface WeiboStatusesUsertimelineVO {
  id: number // 主键
  syncDate: Date // 同步时间
  weiboId: number // 微博ID
  createdAt: Date // 微博创建时间
  mid: string // 微博MID
  text: string // 微博信息内容
  source: string // 微博来源
  thumbnailPic: string // 缩略图片地址
  repostsCount: number // 转发数
  commentsCount: number // 评论数
  attitudesCount: number // 表态数
  detailMessage: string // 报文
}

// 最新发表的微博列表 API
export const WeiboStatusesUsertimelineApi = {
  // 查询最新发表的微博列表分页
  getWeiboStatusesUsertimelinePage: async (params: any) => {
    return await request.get({ url: `/integration/weibo-statuses-usertimeline/page`, params })
  },

  // 查询最新发表的微博列表详情
  getWeiboStatusesUsertimeline: async (id: number) => {
    return await request.get({ url: `/integration/weibo-statuses-usertimeline/get?id=` + id })
  },

  // 新增最新发表的微博列表
  createWeiboStatusesUsertimeline: async (data: WeiboStatusesUsertimelineVO) => {
    return await request.post({ url: `/integration/weibo-statuses-usertimeline/create`, data })
  },

  // 修改最新发表的微博列表
  updateWeiboStatusesUsertimeline: async (data: WeiboStatusesUsertimelineVO) => {
    return await request.post({ url: `/integration/weibo-statuses-usertimeline/update`, data })
  },

  // 删除最新发表的微博列表
  deleteWeiboStatusesUsertimeline: async (id: number) => {
    return await request.get({ url: `/integration/weibo-statuses-usertimeline/delete?id=` + id })
  },

  // 导出最新发表的微博列表 Excel
  exportWeiboStatusesUsertimeline: async (params) => {
    return await request.download({ url: `/integration/weibo-statuses-usertimeline/export-excel`, params })
  }
}